<?php
/**
 * Magento
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License (AFL 3.0)
 * that is bundled with this package in the file LICENSE_AFL.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/afl-3.0.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@magentocommerce.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade Magento to newer
 * versions in the future. If you wish to customize Magento for your
 * needs please refer to http://www.magentocommerce.com for more information.
 *
 * @copyright   Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
 * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 */
/* @var $this \Magento\Wishlist\Block\Share\Email\Items */
?>
<?php $l = $this->getWishlistItemsCount() ?>
<div style="border:1px solid #E0E0E0; padding:15px; background:#F9F9F9;">
    <table cellspacing="0" cellpadding="0" border="0" width="650">
        <tr>
            <?php $i = 0;
            foreach ($this->getWishlistItems() as $item): $i++ ?>
            <?php /* @var $item \Magento\Wishlist\Model\Item */ ?>
            <?php /* @var $_product \Magento\Catalog\Model\Product */ ?>
            <?php $_product = $item->getProduct(); ?>
            <td width="32%" class="col product">
                <p align="center" style="font-size:12px;">
                    <a href="<?php echo $this->getProductUrl($_product) ?>">
                        <img src="<?php echo $this->getSmallImageUrl($_product); ?>" width="<?php echo $this->getSmallImageSize() ?>" height="<?php echo $this->getSmallImageSize() ?>" style="border:1px solid #ccc;" alt=""/>
                    </a>
                </p>

                <p align="center" style="font-size:12px;">
                    <a href="<?php echo $this->getProductUrl($_product) ?>" style="color:#203548;">
                        <strong><?php echo $this->escapeHtml($_product->getName()) ?></strong>
                    </a>
                </p>
                <?php if ($this->hasDescription($item)): ?>
                    <p align="center" style="font-size:12px;"><?php echo __('Comment') ?>:
                    <br/><?php echo $this->getEscapedDescription($item) ?></p><?php endif; ?>
                    <p align="center" style="font-size:12px;">
                        <a href="<?php echo $this->getProductUrl($_product) ?>" style="color:#1E7EC8;">
                            <?php echo __('View Product') ?>
                        </a>
                    <small>|</small>
                    <?php if ($_product->getIsSalable()): ?>
                    <a href="<?php echo $this->getAddToCartUrl($_product) ?>" style="color:#1E7EC8;">
                        <strong><?php echo __('Add to Cart') ?></strong>
                    </a>
                    <?php endif; ?>
                </p>
            </td>
            <?php if ($i % 3 != 0): ?>
                <td width="2%"></td>
            <?php else: ?>
        </tr>
        <tr>
            <td colspan="5">&nbsp;</td>
        </tr>
            <?php if ($i < $l): ?>
            <tr>
            <?php endif ?>
            <?php endif ?>
            <?php endforeach ?>
    </table>
</div>
